<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>number</title>
	<style>
		*, html, body {
			margin: 0px;
			padding: 0px;
		}
	 .box{
    position: absolute;
    /* z-index: 2; */
    z-index: auto;
    /* display: flex; */
    justify-content: center;
    width: 100%;
    height: 600px;
    overflow: hidden;
   }

  .mask{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.5);
  }

  .content{
    position: absolute;
    width:400px;
    height:400px;
    z-index: 6;
    transform-style: preserve-3d;
    perspective: 800px;
    animation: turnBack 6s backwards linear;
    background-color:yellow;
    transform: rotateY(30deg);
   }

  .front{
    position:absolute;
    top:0;
    left:0;
    z-index: 2;
    backface-visibility: hidden;
    background-color:pink;
    width:100%;
    height:100%;
  }
  .back{
    transform:rotateY(180deg) translateZ(1px);
    position:absolute;
    z-index: 2;
    top:0;
    left:0;
    backface-visibility: hidden;
    background-color:blue;
    color:#fff;
    width:100%;
    height:100%;
  }

  @keyframes turnBack {
    from {
      transform: rotateY(0deg);
    }
    50% {
      transform: rotateY(180deg);
    }
    to {
      transform: rotateY(360deg);
    }
  }

</style>
</head>
<body>

<div class="box">
   <div class="mask"></div> 
   <div class="content">
      <div class="front">正面</div>
      <div class="back">反面</div>
   </div>
</div>
</body>
</html>